const {resolve} = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
// dev: 'webpack-dev-server'
module.exports = {
	mode: 'production',
	entry: './index.js',
	output: {
		path: resolve(__dirname, 'dist'),
		filename: 'js/[name].js',
		clean: true
	},
	plugins: [
		new HTMLWebpackPlugin({
			template: './index.html',
			filename: 'index.html',
			title: 'webpack-plugin'
		}),
		new MiniCssExtractPlugin({
			filename: '[name].css'
		})
	],
	// optimization: {
	// 	usedExports: true
	// }
}
